<template>
  <div class="echarts-container">
    <div ref="echarts" class="echarts-content"></div>
  </div>
</template>

<script>
import * as echarts from 'echarts';

export default {
  data() {
    return { };
  },
  mounted() {
    this.initEcharts();
  },
  methods: {
    initEcharts() {
      const myChart = echarts.init(this.$refs.echarts);
      const option = {
        title: {
          show: true,
          text: '华为小米',
          left:5,
          top:5
        },
        radar:{
          indicator:[100,100,100,100,100],//定义最大标准
          shape:"circle",// polygon 默认, circle 圆形
        },
        toolbox: {
          feature: {
            saveAsImage: {},
            dataView: {}
          }
        },
        series: [
          {
            type: 'radar', // 雷达图
            label:{
              show:true,
            },
            areaStyle:{}, //内部填充颜色
            data: [
              {
                name:"华为",
                value:[98,99,80,76,83],
              },
              {
                name:"小米",
                value:[80,88,76,60,70],
              }
            ],
          }
        ]
      }
      myChart.setOption(option);
    },
  },
};
</script>

<style lang="scss" scoped>

</style>
